package 封装作业;

public class Date {
    private  int year;
    private  int month;
    private  int day;
    public int getyear(){
        return year;
    }
    public int getMonth(){
        return month;
    }
    public  int getDay(){
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public  void  setYear(int year){
        this.year =year;
    }

    public void panduan (){
        if (this.year % 400 ==0 && this.year % 4 ==0 && this.year % 100 != 0){
            System.out.println("是闰年");
        }else {
            System.out.println("不是闰年");
        }

    }
}
